/*
 * BlockBitMap.h
 *
 */

#ifndef BLOCKBITMAP_H_
#define BLOCKBITMAP_H_

#include <vector>
#include <fstream>
#include "../BinaryFile.h"

class BlockBitMap : public BinaryFile {
private:
	std::vector<bool> bitmap;
	const String path;

public:
	BlockBitMap();
	virtual ~BlockBitMap();

	void save();
	void load();

	BigInt getFreeBlock();
	void free(BigInt block);
	void take(BigInt block);

	String toString() const;
};

#endif /* BLOCKBITMAP_H_ */
